<?php if(!defined("PATH_HD"))exit;?>
﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link type="text/css" rel="stylesheet" href="http://localhost/zyhhdcms/xm/static/css/base.css"/>
    <style type="text/css">
    a.button2{padding:3px 10px;color:#666;border:solid 1px #ccc;display:inline;         cursor: pointer;
             background:#EFF1F6;}
a:hover.button2{background:#737C93;color:#fff;}
.dialog1{border:solid 10px #dcdcdc;padding:10px 0px; border-radius: 6px;width:680px;_height:400px;position: absolute;background:#fff; display:none;
}

    </style>
	<script type='text/javascript' src='http://localhost/zyhhdcms/xm/hdphp/org/jquery-1.7.2.min.js'></script>
    <script type='text/javascript'>
		HOST = 'http://localhost';
		ROOT = 'http://localhost/zyhhdcms/xm';
		HDPHP = 'http://localhost/zyhhdcms/xm/hdphp';
		STATIC = 'http://localhost/zyhhdcms/xm/static';
		DATA = 'http://localhost/zyhhdcms/xm/data';
		WEB = 'http://localhost/zyhhdcms/xm/index.php';
		APP = 'http://localhost/zyhhdcms/xm/index.php/admin';
		CONTROL = 'http://localhost/zyhhdcms/xm/index.php/admin/category';
		METH = 'http://localhost/zyhhdcms/xm/index.php/admin/category/add_show';
		URL = 'http://localhost/zyhhdcms/xm/index.php/admin/category/add_show/cateid/22';
		ORG = 'http://localhost/zyhhdcms/xm/hdphp/org';
		TPL = 'http://localhost/zyhhdcms/xm/cms/admin/tpl';
		PUBLIC = 'http://localhost/zyhhdcms/xm/cms/admin/tpl/public';
</script>
	<?php C("DEBUG","0");?>
    <link type="text/css" rel="stylesheet" href="http://localhost/zyhhdcms/xm/static/ui/css/flick/jquery-ui-1.8.23.custom.css"/>
    <script type="text/javascript" src="<?php echo "http://localhost/zyhhdcms/xm/static/ui/js/jquery-ui-1.8.23.custom.min.js";?>"></script>
    <script type="text/javascript" src="<?php echo "http://localhost/zyhhdcms/xm/cms/admin/tpl/public/js/category.js";?>"></script>
    <script type="text/javascript" src="<?php echo "http://localhost/zyhhdcms/xm/static/js/base.js";?>"></script>
    <script type="text/javascript">
        $(function(){
            $("#tabs").tabs();
        })
    </script>
	<style type="text/css">

	</style>
</head>
<body marginleft="10">
    <div class="path">
        <strong>您现在的位置：</strong>
        <?php  if(@empty($_GET['catid'])){?>添加顶级栏目<?php }else{ ?>添加子栏目<?php }?>
    </div>
    <form action="http://localhost/zyhhdcms/xm/index.php/admin/category/add" method="post">
        <input type="hidden" name="pid" value="<?php  if(@empty($_GET['catid'])){?>0<?php }else{ ?><?php echo $_GET['catid'];?><?php }?>"/>
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1">基本内容</a></li>
                <li><a href="#tabs-4">权限相关</a></li>
            </ul>
            <div id="tabs-1">
                <table class="table2">
                    <tr>
                      <th> <span style="color:red; font-size:16px">*</span>栏目名称：</th>
                        <td><input type="text" name="cname" class="cname" style="width:360px;"/><span class='error'>*为必填项</span></td>
                    </tr>
                    <tr>
                        <th>目录名称：</th>
                        <td><input type="text" name="catdir" style="width:200px;"/>
                            <span class="desc">目录名称必须为英文</span>
                    </tr>
                    <tr>
                        <th>跳转url：</th>
                        <td><input type="text" name="gourl" style="width:260px;"/></td>
                    </tr>
                    <tr>
                        <th>是否显示：</th>
                        <td><input type="radio" name="isshow" value="1" checked="checked"/>是&nbsp;&nbsp;
                            <input type="radio" name="isshow" value="0"/>否</td>
                    </tr>
                    <tr>
                        <th>关键字：</th>
                        <td><input type="text" name="keywords" style="width:300px;"/></td>
                    </tr>
                    <tr>
                        <th>描述：</th>
                        <td><textarea style="height:60px;width:90%" name="descroption"></textarea></td>
                    </tr>
                </table>
            </div>
                 <div id="tabs-4">
                <table class="table2">
                <tr style='color:blue'>
                    <td>用户组角色</td>
                    <td>查看栏目</td>
                    <td>发表内容</td>
                    <td>发表评论</td>
                            </tr>  <!-- 如果选中的话角色在这个栏目就具有权限 -->
                <?php if(!empty($row)){$listCount = count($row);$list_id1=0;?><?php foreach($row as $key=>$list){?><?php $list_id1+=1;?>
                <tr>
                    <td><?php if(!empty($list['title'])){?><?php echo $list['title'];?>
                        <?php  }else{ ?><?php echo $list['rname'];?><?php }?>
                        </td>
                    <td>
                        <input type="hidden" name="category_access[<?php echo $list['rid'];?>][rid]" value="<?php echo $list['rid'];?>"><!-- 记录角色名 -->
                    <input type="checkbox" name="category_access[<?php echo $list['rid'];?>][show]" value="1" /></td><!-- 查看栏目 --> 
                    <td><input type="checkbox" name="category_access[<?php echo $list['rid'];?>][addarc]" value="1" /></td>
                    <!-- 发表文章 -->
                    <td><input type="checkbox" name="category_access[<?php echo $list['rid'];?>][comment]" value="1" /></td>  <!-- 发表评论 -->
                </tr>
                
                <?php }?><?php }?>
           </table>
            </div>
            <div style="padding-left:100px;">
                <input type="hidden" value="<?php echo $cateid;?>" name="pid" /> 
                <input type="submit" value="添加栏目" class="submit"/>
            </div>
        </div>
    </form>
    <div id="selecttemplate" class="dialog1 opacity90"><!-- 关闭窗口 -->
<a id="closewindow" class="button1" style="display:block;width:60px;margin-left: 10px;">关闭窗口</a>
<iframe src="" id="selecttplview" frameborder="0"></iframe>
</div>
</body>
</html>
